﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

/// <summary>
/// Summary description for User
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
// [System.Web.Script.Services.ScriptService]
public class User : System.Web.Services.WebService {
    UserDAL _userDAL;
    public User () {
        _userDAL = new UserDAL();
        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    public int register(string username, string password, string email, int bankid, string firstname, string lastname, string address, Int64 phonenumber)
    {
        return _userDAL.register(username, password, email, bankid, firstname, lastname, address, phonenumber);
    }

    [WebMethod]
    public string check(string username, string email)
    {
        return _userDAL.check(username, email);
    }

    [WebMethod]
    public int login(string username, string password)
    {
        return _userDAL.login(username, password);
    }

    [WebMethod]
    public string getusername(int userid)
    {
        return _userDAL.getusername(userid); ;
    }
}

